//
//  People.m
//  InstancetypeDemo
//
//  Created by UniHan_iMac on 17/3/29.
//  Copyright © 2017年 UniHan_iMac. All rights reserved.
//

#import "People.h"

@implementation People
// @synchronized 创建单例类
+ (instancetype)sharedPeople
{
    static People *people = nil;
    @synchronized (self) {
        people = [[self alloc] init];
    }
    return people;
}
+ (id)allocWithZone:(struct _NSZone *)zone
{
    static People *people = nil;
    @synchronized (self) {
        people = [super allocWithZone:zone];
    }
    return people;
}
@end
